#!/bin/bash

if [ -x `which git` ]; then
    if [ -n "$1" ]; then
        git add .
        git commit -m "$1"
        git push -u origin master
    else 
        echo "Please enter a message when commit!"
    fi
fi